package com.wisezone.demo0214;

public class Test {
    public static void main(String[] args) {
        //第一种启动线程方案
        //构造子线程对象
        MyThread myThread = new MyThread();
        myThread.start();
        //myThread.run();
        //取得当前线程
        Thread t =  Thread.currentThread();
        System.out.println("线程名称:"+t.getName());
        //第二种启动线程方案
        MyRunable myRunable = new MyRunable();
        Thread thread = new Thread(myRunable);
        thread.start();
    }
}
